/**
 * 
 */
package systole.domain.persons;

import java.util.ArrayList;
import java.util.Collection;

import systole.domain.analysis.Analysis;

/**
 * @author juan
 * 
 */
public class Medic extends Person {

    /**
     *
     */
    private static final long serialVersionUID = 4687370033610197974L;
    private String specialty;
    private String license;
    private Collection<Patient> patients = new ArrayList<Patient>();
    private Collection<Analysis> analysis = new ArrayList<Analysis>();

    /**
     * 
     */
    public Medic() {
        super();
    }

    /**
     * @return list of patients
     */
    public Collection<Patient> getPatients() {
        return this.patients;
    }

    /**
     * @param patients
     */
    public void setPatients(Collection<Patient> patients) {
        this.patients = patients;
    }

    /**
     * @return list of analysis
     */
    public Collection<Analysis> getAnalysis() {
        return this.analysis;
    }

    /**
     * @param analysis
     */
    public void setAnalysis(Collection<Analysis> analysis) {
        this.analysis = analysis;
    }   

    /* (non-Javadoc)
     * @see java.lang.Object#hashCode()
     */
    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((this.getId() == null) ? 0 : this.getId().hashCode());
        return result;
    }

    /* (non-Javadoc)
     * @see java.lang.Object#equals(java.lang.Object)
     */
    @Override
    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj == null) {
            return false;
        }
        if (!(obj instanceof Medic)) {
            return false;
        }
        Medic other = (Medic) obj;
        if (this.getId() == null) {
            if (other.getId() != null) {
                return false;
            }
        } else if (!this.getId().equals(other.getId())) {
            return false;
        }
        return true;
    }

    /**
     * @param specialty the specialty to set
     */
    public void setSpecialty(String specialty) {
        this.specialty = specialty;
    }

    /**
     * @return the specialty
     */
    public String getSpecialty() {
        return this.specialty;
    }

    /**
     * @return the license
     */
    public String getLicense() {
        return license;
    }

    /**
     * @param license the license to set
     */
    public void setLicense(String license) {
        this.license = license;
    }

    
}
